﻿<controls:ChildWindow x:Class="CARE.Views.DatabaseDiseaseWindow"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           Width="400" Height="300" 
           xmlns:ds="clr-namespace:CARE.Web.Services"                 
           Title="Database Disease Selector" xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Ria">

        <Grid x:Name="LayoutRoot" Margin="2">    
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <StackPanel Orientation="Vertical">
            <TextBlock x:Name="Description" TextWrapping="Wrap" Height="100" Width="200" HorizontalAlignment="Center" VerticalAlignment="Top" Text="{Binding Source={StaticResource ResourceWrapper}, Path=ApplicationStrings.DatabaseModelSelector}">
            </TextBlock>
            <ComboBox Name="networksBox" ItemsSource="{Binding ElementName=diseaseDomainDataSource, Path=Data}"></ComboBox>
            <TextBlock Name="networkDescription" TextWrapping="Wrap" Width="200" Height="Auto" HorizontalAlignment="Center" Margin="0,10,0,0" Text="{Binding Path=Data.description, ElementName=diseaseDomainDataSource}">
            </TextBlock>
        </StackPanel>

        <Button x:Name="CancelButton" Content="Cancel" Click="CancelButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="1" />
        <Button x:Name="OKButton" Content="OK" Click="OKButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,79,0" Grid.Row="1" />
        <riaControls:DomainDataSource AutoLoad="True" Height="0" LoadedData="diseaseDomainDataSource_LoadedData" Name="diseaseDomainDataSource" QueryName="GetDiseasesQuery" Width="0">
            <riaControls:DomainDataSource.DomainContext>
                <ds:DataProvider />
            </riaControls:DomainDataSource.DomainContext>
        </riaControls:DomainDataSource>
    </Grid>
</controls:ChildWindow>